package com.test.ssm.service.impl;

import com.test.ssm.dao.HostDAO;
import com.test.ssm.pojo.HostIp;
import com.test.ssm.service.HostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class HostServiceImpl implements HostService {

    @Autowired
    private HostDAO hostDAO;

    @Override
    public HostIp getHostById(Integer id) {
        return hostDAO.getHostById(id);
    }

    @Override
    public void updateHost(HostIp hostIp) {
        hostDAO.updateHost(hostIp);
    }

    @Override
    public Integer getHostId(String host, Integer port) {
        return hostDAO.getHostId(host, port);
    }
}
